package com.thingcom.delinrobot.main.adddevice;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.drawerlayout.widget.DrawerLayout;
import com.thingcom.delinrobot.R;
import com.thingcom.delinrobot.base.BaseActivity;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * author : YuFeng
 * e-mail : 923462992@qq.com
 * date   : 2019/11/13
 */
public class DeviceListActivity extends BaseActivity  {
    @BindView(R.id.drawer_device_list)
    DrawerLayout drawerDeviceList;
//    @BindView(R.id.nav_device_list)
//    NavigationView navDeviceList;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_device_list);
        ButterKnife.bind(this);
        if (findFragment(DeviceListFragment.class) == null) {
            loadRootFragment(R.id.fl_container, DeviceListFragment.newInstance());
        }
//        /**
//         * 放上监听
//         */
//        navDeviceList.setNavigationItemSelectedListener(this);
//        navDeviceList.setCheckedItem(R.id.nav_device_list);
    }



//    @Override
//    public boolean onNavigationItemSelected(@NonNull MenuItem item) {
//        drawerDeviceList.closeDrawer(GravityCompat.START);
//        drawerDeviceList.postDelayed(new Runnable() {
//            @Override
//            public void run() {
//                int id = item.getItemId();
//                if (id == R.id.nav_list_out) {
//                    finish();
//                }
//            }
//        },300);
//            return true;
//    }
//
//    @Override
//    public void onOpenDrawer() {
//        if (!drawerDeviceList.isDrawerOpen(GravityCompat.START)) {
//            drawerDeviceList.openDrawer(GravityCompat.START);
//        }
//    }
//
//    @Override
//    public void onLockedDrawer() {
//       //禁止手势滑动
//        drawerDeviceList.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
//    }
}
